import jenkins

xml_1 = '''<?xml version='1.1' encoding='UTF-8'?>
<flow-definition plugin="workflow-job@2.40">
  <actions/>
  <description></description>
  <keepDependencies>false</keepDependencies>
  <properties/>
  <definition class="org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition" plugin="workflow-cps@2.87">
    <script> 
    </script>
    <sandbox>true</sandbox>
  </definition>
  <triggers/>
  <disabled>false</disabled>
</flow-definition>'''

server = jenkins.Jenkins('http://localhost:8081', username='root',password='116aeb1344bf51d7c80c1f0c01a2f34cce')

# last_build_number = server.get_job_info('hello_world')['lastCompletedBuild']['number']
#
# build_info = server.get_build_info('hello_world', last_build_number)
server.create_job('13',config_xml=xml_1)


# print(ok)